import 'package:flutter/material.dart';
import 'package:hktk_app/decoration/subject/chapter_indent_decoration.dart';

/// 章节缩进组件
class ChapterIndentWidget extends StatelessWidget {
  /// 高度
  final double? height;

  /// 虚线位置
  final double indent;

  /// 左边边距
  final double paddingLeft;

  /// 内容显示组件
  final Widget? child;

  const ChapterIndentWidget({
    super.key,
    required this.indent,
    required this.paddingLeft,
    this.height,
    this.child,
  });

  @override
  Widget build(BuildContext context) {
    return Container(
      height: height,
      margin: EdgeInsets.only(left: indent),
      padding: EdgeInsets.only(left: paddingLeft),
      decoration: const ChapterIndentDecoration(),
      child: child,
    );
  }
}
